Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable startup assembly support for MSBuild integration #34034

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

AndriySvyryd
Copy link
Member

Allow DbContextAttribute to be used to find the referenced context types

Allow DbContextAttribute to be used to find the referenced context types
@@ -474,8 +474,19 @@ where i.IsGenericType
}
}

// Look for DbContext classes registered in the service provider
// Look for DbContextAttribute on the assembly
var appServices = _appServicesFactory.Create(_args);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this suffers from the same technicality as #27322. That is, even if we find a context by this mechanism, it could actually be a different one than would have been returned by running service discovery, if it were working correctly at design time. So we could end up working with the "wrong" context type. I personally think this is very unlikely, but it has been the sticking point on #27322 over the years.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I plan to fix #27322 separately.
Also, I want to discuss this change in a design meeting.

Base automatically changed from GenerateFactories to main June 20, 2024 18:31
@AndriySvyryd AndriySvyryd enabled auto-merge (squash) June 20, 2024 18:45
@AndriySvyryd AndriySvyryd marked this pull request as draft June 20, 2024 19:57
@AndriySvyryd AndriySvyryd marked this pull request as ready for review June 20, 2024 19:57
@AndriySvyryd AndriySvyryd reopened this Jun 20, 2024
@AndriySvyryd AndriySvyryd enabled auto-merge (squash) June 20, 2024 19:59
@maumar maumar disabled auto-merge June 20, 2024 20:42
@maumar
Copy link
Contributor

maumar commented Jun 20, 2024

I disabled auto merge, please check in after #34043

@AndriySvyryd AndriySvyryd merged commit c0c11c1 into main Jun 20, 2024
7 checks passed
@AndriySvyryd AndriySvyryd deleted the LimitStartup branch June 20, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants